<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt"  uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title><spring:message code="head.clothGarment"></spring:message>-<spring:message code="head.registered"></spring:message></title>
    <link href="${pageContext.request.contextPath }/phone/css/font/iconfont.css" rel="stylesheet" type="text/css" />
    <!--公共样式-->
    <link href="${pageContext.request.contextPath }/phone/css/public.css" rel="stylesheet" type="text/css" />
    <!--登录、注册、忘记密码三个页面样式-->
    <link href="${pageContext.request.contextPath }/phone/css/login1.css" rel="stylesheet" type="text/css" />
    <style>
    .load-type-inp label{margin-left:0;width: 25%;font-weight:normal;}
    .load-type-inp .phone, .load-type-inp .secret{border:none;}
    .load-type-inp input{border:1px solid #000;border-radius:15px;height:30px;line-height:30px;text-indent:1em;width:69%;}
    .load-type-inp label{text-align:right;}
    .load-type-inp label.text-left{text-align:left;}
    a.secret_code{background:#ababab;color:#000;border-radius:0;height:30px;line-height:30px;margin: 4px 0;}
    .readagrbox{text-align:center;}
    </style>
</head>
<body>
<!--头部 begin-->
<header class="page_topbar" style="position:relative;">
    <a href="javascript:history.go(-1);" class="back Hui-iconfont"></a>
    <a href="${pageContext.request.contextPath }/api/main/index" class="home Hui-iconfont">&#xe625;</a>
    <div class="title"><spring:message code="head.registered.title"></spring:message></div> 
</header>
<!--头部 end-->

<div class="fast-load" style="margin-top:15px;"><!--普通登陆-->
<img class="loginlogo" src="${pageContext.request.contextPath }/phone/img/logo.png" />
<form id="regForm" action="javascript:void(0)">
	<input type="hidden" name="language" value="1">
    <div class="load-type-inp">
        <div class="phone">
            <label class="text-left"><spring:message code="login.phoneaaa.name"></spring:message>：</label>
            <input type="text" id="realname" name="name" />
        </div>
    </div>
    <div class="threebox">
    	<div class="threeleft">
	    	<input type="radio" name="merchantType" value="服装贸易商" />
	    	<label><spring:message code="register.clothing"></spring:message></label>
    	</div>
		<div class="threeleft">
			<input type="radio" name="merchantType" value="面料贸易商" />
			<label><spring:message code="register.fTrader"></spring:message></label>
		</div>
		<div class="clearfix"></div>
		<div class="threeleft">
			<input type="radio" name="merchantType" value="品牌运营商" />
			<label><spring:message code="register.brandOp"></spring:message></label>
		</div>
		<div class="threeleft">
			<input type="radio" name="merchantType" value="服装厂" />
			<label><spring:message code="register.factory"></spring:message></label>
		</div>
		<div class="clearfix"></div>
	</div>
	<div class="threeboxtwo">
		<div class="threeright">
			<input type="radio" name="type" value="设计师" />
			<label><spring:message code="register.designer"></spring:message></label>
		</div>
		<div class="threeright">
			<input type="radio" name="type" value="开发员" />
			<label><spring:message code="register.developer"></spring:message></label>
		</div>
		<div class="threeright">
			<input type="radio" name="type" value="采购" />
			<label><spring:message code="register.purchase"></spring:message></label>
		</div>
		<div class="clearfix"></div>
	</div>
    <div class="block-auto">
    	<a class="end-next load-step" onclick="reg();" href="#"><spring:message code="next.registered"></spring:message></a>
   	</div>

</form>
</div>
</body>
<script src="${pageContext.request.contextPath }/phone/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/h-ui/lib/layer/layer_mobile/layer.js"></script>
<script src="${pageContext.request.contextPath }/phone/js/code.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/web/js/plugins/validate/jquery.validate.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/web/js/plugins/validate/messages_zh.min.js"></script>
<script type="text/javascript">
//注册
function reg(){
	var realname=$("#realname").val();
	var type = $('input[name="merchantType"]:checked ').val();
	var role = $('input[name="type"]:checked ').val();
	if(realname==null||realname==""){
		layer.open({
		    content: '<spring:message code="register.enterRealname"></spring:message>'
		    ,skin: 'msg'
		    ,time: 1 //1秒后自动关闭
		  });
		return false;
	}
	if(type==null||type==""){
		layer.open({
		    content: '<spring:message code="register.selectType"></spring:message>'
		    ,skin: 'msg'
		    ,time: 1 //1秒后自动关闭
		  });
		return false;
	}
	if(role==null||role==""){
		layer.open({
		    content: '<spring:message code="register.selectRole"></spring:message>'
		    ,skin: 'msg'
		    ,time: 1 //1秒后自动关闭
		  });
		return false;
	}
	window.location.href='${pageContext.request.contextPath }/api/toPhonePage/registerNext?realname='+realname+'&merchantType='+type+'&type='+role;
}

</script>
</html>